using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using Microformats.ConfigurationSections;

namespace ConfigurationReader
{
    /// <summary>
    /// This Reference application is designed to show the usage of the configuration files in the framework.
    /// 
    /// The first itteration simply states the 
    /// </summary>
    class ConfigurationReaderProgram
    {
        static void Main(string[] args)
        {
           MicroformatConfigSection config = (MicroformatConfigSection) ConfigurationManager.GetSection("MicroformatsSection");

           Console.Out.WriteLine("Configured Microformats:");
           Console.Out.WriteLine("=======================");
           foreach (MicroformatElement m in config.Microformats)
           {
               Console.Out.Write("Type: ");
               Console.Out.Write(m.Type);
               Console.Out.Write("\tRoot: ");
               Console.Out.Write(m.Root);
               Console.Out.Write("\tRoot Type: ");
               Console.Out.Write(m.RootType);
               Console.Out.Write(Console.Out.NewLine);
           }

           Console.Out.WriteLine("Program Finsihed.");
           Console.In.ReadLine();
        }
    }
}
